package com.lgw.demo.tools;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

//统一异常处理
@ControllerAdvice
public class ErrorHandler {
    @ExceptionHandler(value=Exception.class)
        public String errorHandler(Exception ex){
        return "404.html";
    }
}
